home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_16_jep_cinematic_2.cog < prev    next >
Text File  |  1999-11-15  |  17KB  |  605 lines

  1. # Jones 3D Cog Script
  2. #
  3. # 16_JEP_Cinematic_2.cog
  4. #
  5. # Sophia rescues Indy by helicopter
  6. #
  7. # [HB]
  8. #
  9. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ==============================================================================
  12.  
  13. symbols
  14.  
  15. # .................................. MESSAGES ..................................
  16.  
  17.     message        startup
  18.     message        entered
  19.     message        pulse
  20.     
  21. # .................................. KEYFRAMES .................................
  22.     
  23.     keyframe    in_climbincop=0in_climbinheli.key        local
  24.     keyframe    in_grabladder=0ij_grab_ladder.key        local
  25.     keyframe    in_hangladder=0in_ladder_hang.key        local
  26.     keyframe    in_sitcop=0in_lookfwd_sit.key            local
  27.     keyframe    in_leftfwd=0in_lookL_bd_fwd_sit.key        local
  28.     keyframe    in_lookleft=0in_lookL_sit.key            local
  29.     keyframe    in_fwdleft=0in_lookfwd_bd_L_sit.key        local
  30.  
  31.     keyframe    so_idlecop=0so_stand6.key                local
  32.     keyframe    so_sitcop=0so_lookfwd_sit.key            local
  33.     keyframe    so_fwdright=0so_lookfwd_bd_R_sit.key    local
  34.     keyframe    so_lookright=0so_lookR_sit.key            local
  35.     keyframe    so_rightfwd=0so_lookR_bd_fwd_sit.key    local
  36.     keyframe    so_leftup=0so_lefthand_sit.key            local
  37.  
  38.     keyframe    chopFly=cyn_chopr_fly.key                local
  39.         
  40. # .................................. MODELS ....................................
  41.         
  42.     model        chop_blad=cyn_chopr_blade.3do            local
  43.     model        chop_rot=cyn_chopr_rotor.3do            local
  44.  
  45.     model          mod_so_Helmet=head_so_helmet.3do        local 
  46.             
  47. # .................................. SOUNDS ....................................
  48.     
  49.     sound        so_worried=Jp02s01.wav                    local
  50.     sound        in_metoo=Jp02j02.wav                    local
  51.     sound        so_voltoteo=Jp02s03.wav                    local
  52.     sound        in_mexico=Jp02j04.wav                    local
  53.     sound        so_builtbab=Jp02s05.wav                    local
  54.     sound        in_azerim=Jp02j06.wav                    local
  55.     sound        so_getjump=Jp02s07.wav                    local
  56.     sound        helirun1=helicopter_rev1.wav            local
  57.     sound        helirun2=helicopter_rev2.wav            local
  58.  
  59.     sound        music0=mus_jep_indyrescue1.wav            local
  60.     sound        music1=mus_jep_indyrescue2.wav            local
  61.  
  62.     
  63. # ............................... ACTOR THINGS .................................
  64.  
  65.     thing        player                                    local
  66.     thing        indy                                     linkid=0
  67.     thing        sophia
  68.     thing        copter
  69.     thing        jeepactor
  70. #    thing        jeep
  71.     thing        ladder
  72.     thing        indyladder
  73.      
  74. # .............................. OBJECT THINGS .................................
  75.  
  76.     thing        tree1                                    nolink
  77.     thing        tree2                                    nolink
  78.     thing        tree3                                    nolink
  79.     thing        tree4                                    nolink
  80.     thing        tree5                                    nolink
  81.     thing        tree6                                    nolink
  82.     thing        tree7                                    nolink
  83.     thing        tree8                                    nolink
  84.     thing        tree9                                    nolink
  85.     thing        tree10                                    nolink
  86.  
  87.     thing        rock1                                    nolink
  88.     thing        rock2                                    nolink
  89.     thing        rock3                                    nolink
  90.     thing        rock4                                    nolink
  91.     thing        rock5                                    nolink
  92.     thing        rock6                                    nolink
  93.     thing        rock7                                    nolink
  94.     thing        rock8                                    nolink
  95.  
  96. # .............................. CAMERA THINGS .................................
  97.  
  98.     thing        cam_1                                    nolink
  99.     thing        cam_2                                    nolink
  100.     thing        cam_3                                    nolink
  101.     thing        cam_4                                    nolink
  102.     thing        cam_5                                    nolink
  103.     thing        cam_6                                    nolink
  104.     thing        cam_7                                    nolink
  105.     
  106.     thing        ct_1                                    nolink
  107.     thing        ct_2                                    nolink
  108.     thing        ct_3                                     nolink
  109.     thing        ct_4a                                    nolink
  110.     thing        ct_4b                                    nolink
  111.     thing        ct_5                                    nolink
  112.     thing        ct_6                                    nolink
  113.     thing        ct_7                                    nolink
  114.     thing        fader                        # gen_fadeplat thing
  115.  
  116.  
  117. # .............................. TARGET THINGS .................................
  118.  
  119.     thing        so_mk_1                                    nolink
  120.  
  121.     thing        jep_mk_1                                nolink
  122.     thing        jep_mk_2                                nolink
  123.     
  124.     thing        cop_mk_1                                nolink
  125.     thing        cop_mk_2                                nolink
  126.     thing        cop_mk_3                                nolink
  127.     thing        cop_mk_4                                nolink
  128.     thing        cop_mk_5                                nolink
  129.  
  130.     thing        ldr_mk_1                                nolink
  131.  
  132. # ........................ OTHER ENGINE REFERENCES .............................
  133.             
  134.     sector        trigger
  135.  
  136.     surface        invisiface                                mask=0x404
  137.     surface        cloudface1
  138.     surface        cloudface2
  139.     
  140. # ............................... VARIABLES ....................................
  141.     
  142.     vector        posOffset                                local
  143.     vector        angOffset                                local
  144.  
  145. #    flex        in_rotRate                                local
  146.     flex        cop_rotRate                                local
  147.  
  148.     int            cutSceneState=0                            local
  149.  
  150.     int            in_keyTrack1                            local
  151.     int            so_keyTrack1                            local
  152.     int            cop_keyTrack1                            local
  153.         
  154.     int            curSound                                local
  155.     int            coptersound1                            local
  156.     int            coptersound2                            local
  157.  
  158. #    int            curCam                                    local
  159.     int            vibe                                    local
  160.  
  161.     int            demostate=0
  162.  
  163. # .............................. SUBROUTINES ...................................
  164.     
  165.     flex        prep_jeep                                local
  166.  
  167. end
  168.  
  169. # ==============================================================================
  170.  
  171. code
  172.  
  173. # ..............................................................................
  174.  
  175. startup:
  176.  
  177.     # Pointer to Player...
  178.     player = GetLocalPlayerThing();
  179.  
  180.     # Prep actors...
  181.     SetThingFlags(indy, 0x80000);
  182.     SetThingFlags(copter, 0x80000);
  183.     cop_rotRate = GetThingMaxRotVel(copter);
  184.  
  185.     # Prep the set...
  186.     SetThingFlags(jeepactor, 0x80000);
  187.     SetThingFlags(ladder, 0x80000);
  188.     SetFaceGeoMode(cloudface1, 0x0);
  189.     SetFaceGeoMode(cloudface2, 0x0);
  190.  
  191.     SetThingAlpha(fader, 0.0);
  192.  
  193.     return;
  194.  
  195. # ..............................................................................
  196.  
  197. entered:
  198.  
  199.     if (GetSenderRef() == invisiface)
  200.     {
  201.         # Drop jeep off cliff...
  202.         # (kill mine car track as it enters off-edge section) 
  203.         Sleep(0.1);
  204.         SetAdjoinFlags(invisiface, 0x2); # makes this adjoin traversable
  205.         DetachThing(GetLocalPlayerThing());
  206.     }    
  207.         if (cutSceneState > 0)
  208.     {
  209.         return;
  210.     }
  211.     if(GetSenderRef() == trigger)
  212.     {
  213.     # Prep...
  214.         call prep_jeep;
  215.         player = GetLocalPlayerThing(); # now that he's in the jeep
  216.         cutSceneState = 1;
  217.         StartCutScene(1);
  218.         SetCameraLookInterp(2, 0); # no
  219.         SetCameraPosInterp(2, 0);
  220.  
  221.     # Cut to down shot of Indy in the jeep...
  222.         SetActorFlags(player, 0x200000);
  223.         SetThingFlags(player, 0x80000);
  224.         StopThing(player);
  225.         CopyPlayerHolsters(player, jeepactor);
  226.         ClearThingFlags(jeepactor, 0x80000);
  227.         AttachThingToThing(ct_1, jeepactor);
  228.         SetCameraFocus(2, cam_1);
  229.         SetCameraSecondaryFocus(2, ct_1);
  230.         SetCurrentCamera(2);
  231.         SetCameraFOV(30, 0, 0.0); # was 45
  232.         
  233.     # Move that jeep...
  234.         SetThingThrust(jeepactor, '0.0 2.0 0.0');
  235.         Sleep(0.01);
  236.         SetCameraFOV(90, 1, 5.5);
  237.  
  238.     # Camera tracks jeep's progress...
  239.         MoveToFrame(ct_1, 1, 0.2);
  240.         MoveToFrame(cam_1, 1, 6.6);
  241.         Sleep(0.8);
  242.  
  243.     # Copter appears...
  244.         ClearThingFlags(copter, 0x80000);
  245.         ClearThingFlags(ladder, 0x80000);    
  246.         ClearThingFlags(sophia, 0x80000);
  247.         SetThingMesh(copter, 3, chop_blad, 0); # main rotor
  248.         SetThingMesh(copter, 1, chop_rot, 0); # tail rotor
  249.         cop_keyTrack1 = PlayKey(copter, chopFly, 4, 0x10, 0);
  250.         AttachThingToThingEx(ladder, copter, 0x000C);
  251.         ### ldr_keyTrack1 = PlayKey(ladder, lad_flap, 4, 0x10, 0);
  252.         
  253.     # Swap in Sophia's goggle head
  254.         SetThingMesh(sophia, 2, mod_so_Helmet, 0);
  255.         SetThingMesh(sophia, 3, mod_so_Helmet, 1);
  256.         SetThingMesh(sophia, 4, mod_so_Helmet, 2);
  257.         SetThingMesh(sophia, 5, mod_so_Helmet, 3);
  258.         SetThingMesh(sophia, 6, mod_so_Helmet, 4);
  259.         SetThingMesh(sophia, 7, mod_so_Helmet, 5);
  260.         SetThingMesh(sophia, 8, mod_so_Helmet, 6);
  261.         SetThingMesh(sophia, 9,  mod_so_Helmet, 7);
  262.         SetThingMesh(sophia, 10, mod_so_Helmet, 8);
  263.  
  264.     # RT: Set up new voice heads!
  265.         SetThingVoiceHeads(sophia, "sohead", "head_so_helmet.3do", "head_so_helmet_asound.3do", "head_so_helmet_amsound.3do", "head_so_helmet_osound.3do");
  266.  
  267.         so_keyTrack1 = PlayKey(sophia, so_idlecop, 4, 0x10, 0);
  268.         AttachThingToThingEx(sophia, copter, 0x000C);
  269.  
  270.  
  271. #======== Copter Outside Sound ========================
  272. coptersound1=PlaySoundThing(helirun2, copter, 0.2, 35, 100, 1);
  273. ChangeSoundVol(coptersound1, 1.0, 2.0);
  274.     
  275.     # Copter decelerates as it moves into frame...
  276.         AISetMoveSpeed(copter, 4.0);
  277.         AISetMoveThing(copter, cop_mk_1, 0);
  278.         Sleep(0.35); # magic number to control copter frame position
  279.         AISetMoveSpeed(copter, 3.2); # magic number
  280.         Sleep(0.5); # magic number
  281.         AISetMoveSpeed(copter, 2.4); # magic number
  282.         Sleep(0.8); # magic number
  283.         AISetMoveSpeed(copter, 1.8); # magic number
  284.         Sleep(3.0);
  285.  
  286. #---------- First music cue -------------
  287. PlaySoundLocal(music0, 1.0, 0.0, 0x0, 0);
  288.  
  289.     # Cut to up angle past jeep to copter...
  290.         DestroyThing(rock1);
  291.         DestroyThing(tree1);
  292.         DestroyThing(tree2);
  293.         DestroyThing(tree3);
  294.         TeleportThing(copter, cop_mk_2);
  295.         SetThingFlags(sophia, 0x10); # hide Sophia for a while
  296.         TeleportThing(jeepactor, jep_mk_1);
  297.         AISetMoveSpeed(copter, 1.6); # was 1.7
  298.         AISetMoveThing(copter, cop_mk_3, 0);
  299.         SetCameraFocus(2, cam_2);
  300.         SetCameraSecondaryFocus(2, ct_2);
  301.         SetCameraFOV(100, 0, 0.0);
  302.         MoveToFrame(cam_2, 1, 6.6);
  303.         MoveToFrame(ct_2, 1, 6.6);
  304.         Sleep(0.01);
  305.         SetCameraFOV(80, 1, 4.8);
  306.         Sleep(1.4);
  307.  
  308.     # Indy grabs for the ladder...
  309.         PlayKey(jeepactor, in_grabladder, 4, 0x12, 0);
  310.         Sleep(3.4);
  311.  
  312.     # Cut to jeep falling off cliff as Indy hangs onto ladder...
  313.         ### StopKey(ladder, ldr_keytrack1, 0.0);
  314.         DestroyThing(rock2);
  315.         DestroyThing(rock3);
  316.         DestroyThing(rock4);
  317.         DestroyThing(tree4);
  318.         DestroyThing(tree5);
  319.         DestroyThing(tree6);
  320.         DestroyThing(tree7);
  321.         DestroyThing(ladder);
  322.         SetThingFlags(copter, 0x10); # hide copter for a while
  323.         TeleportThing(indyladder, ldr_mk_1);
  324.         ClearThingFlags(indyladder, 0x80000);
  325.     #======== Copter Outside Sound ========================
  326.         coptersound1=PlaySoundThing(helirun2, indyladder, 1.0, 45, 100, 1);
  327.  
  328. #---------- Second music cue -------------
  329. PlaySoundLocal(music1, 1.0, 0.0, 0x0, 0);
  330.  
  331.         TeleportThing(jeepactor, jep_mk_2);    
  332.         AmputateJoint(jeepactor, 7); # stop drawing Indy in the jeep
  333.         AttachThingToThingEx(indyladder, ldr_mk_1, 0x000C);
  334.         SetCameraFocus(2, cam_3);
  335.         SetCameraSecondaryFocus(2, ct_3);
  336.         SetCameraFOV(70, 0, 0.0);
  337.         in_keyTrack1 = PlayKey(indyladder, in_hangladder, 4, 0x10, 0);
  338.         MoveToFrame(cam_3, 1, 7.0);
  339.         MoveToFrame(ldr_mk_1, 1, 9.0); # was 7.0
  340.         MoveToFrame(ct_3, 1, 7.0);
  341.         Sleep(0.01);
  342.         if (demostate == 0)
  343.         {
  344.             SetCameraFOV(80, 1, 3.0);
  345.             Sleep(2.7); # was 3.0
  346.         }
  347.         else
  348.         {
  349.             SetCameraFOV(80, 1, 2.7);
  350.             Sleep(2.7); # was 3.0
  351.         }
  352.         
  353.  
  354.     # Cut to inside helicopter...
  355.         SetFaceGeoMode(cloudface1, 0x04); # now see clouds only behind copter
  356.         SetFaceGeoMode(cloudface2, 0x04);
  357.         StopKey(indyladder, in_keyTrack1, 0.0);
  358.         DestroyThing(rock5);
  359.         DestroyThing(rock6);
  360.         DestroyThing(rock7);
  361.         DestroyThing(rock8);
  362.         DestroyThing(tree8);
  363.         DestroyThing(tree9);
  364.         DestroyThing(tree10);
  365.         DestroyThing(indyladder);
  366.         DestroyThing(jeepactor);
  367.         TeleportThing(copter, cop_mk_4);
  368.  
  369.     #================= copter inside sound ===============
  370.         StopSound(coptersound1, 0.01);
  371.         coptersound2=PlaySoundLocal(helirun1, 1, 0.0, 0x9, 0);
  372.  
  373.         TeleportThing(sophia, so_mk_1);
  374.         AttachThingToThingEx(sophia, copter, 0x000C);
  375.         StopKey(sophia, so_keyTrack1, 0.0);
  376.         so_keyTrack1 = PlayKey(sophia, so_sitcop, 4, 0x10, 0);
  377.         ClearThingFlags(copter, 0x10); # see copter 
  378.         ClearThingFlags(sophia, 0x10); # see Sophia
  379.         ClearThingFlags(indy, 0x80000); # see Indy
  380.         AttachThingToThingEx(indy, copter, 0x000C);
  381.  
  382. if (demostate == 0) #### OUT FOR DEMO ####
  383. {
  384.         SetCameraFocus(2, cam_4);
  385.         SetCameraSecondaryFocus(2, ct_4a);
  386.         SetCameraFOV(85, 0, 0.0); # was 75
  387.         SlideHorizonSky(-0.02, 0.0);
  388.  
  389.     # Helicopter vibrates in flight...
  390.         SetPulse(0.15);
  391.  
  392.     # Indy climbs aboard...
  393. #        in_keyTrack1 = PlayKey(indy, in_sitcop, 2, 0x10, 0);
  394.         PlayKey(indy, in_climbincop, 4, 0x12, 0);
  395.     
  396.     # Pan to Sophia...
  397.         SetCameraLookInterp(2, 1); # pan
  398.         SetCameraInterpSpeed(2, 3.0);
  399.         Sleep(0.01);
  400.         SetCameraSecondaryFocus(2, ct_4b);
  401.         SetCameraFOV(55, 1, 3.0);
  402.         Sleep(1.2);
  403.         SlideHorizonSky(0.02, 0.0);
  404.         StopKey(indy, in_keyTrack1, 0.0);
  405.         in_keyTrack1 = PlayKey(indy, in_lookleft, 2, 0x10, 0);
  406.         PlayKey(indy, in_fwdleft, 4, 0x12, 0);
  407.     
  408.     # Sophia:  "About time, Jones.  I was almost worried."
  409.         Sleep(0.1); # was 0.5
  410.         curSound = PlayVoice(sophia, so_worried, 1.0, 0);
  411.         Sleep(0.1);
  412.         SlideHorizonSky(0.02, 0.0);
  413.         StopKey(sophia, so_keyTrack1, 0.0);
  414.         so_keyTrack1 = PlayKey(sophia, so_lookright, 2, 0x10, 0);
  415.         PlayKey(sophia, so_fwdright, 4, 0x12, 0);
  416.         WaitForSound(curSound);
  417.  
  418.     # Cut to Indy...
  419.         SetCameraLookInterp(2, 0);
  420.         SetCameraFocus(2, cam_5);
  421.         SetCameraSecondaryFocus(2, ct_5);
  422.         SetCameraFOV(40, 0, 0.0);
  423.         SlideHorizonSky(-0.04, 0.0);
  424.  
  425.     # Indy: "Yeah?  Me too."
  426.         curSound = PlayVoice(indy, in_metoo, 1.0, 0);
  427.         ### Sleep(0.2);
  428.         WaitForSound(curSound);
  429.         StopKey(indy, in_keyTrack1, 0.0);
  430.         in_keyTrack1 = PlayKey(indy, in_sitcop, 2, 0x10, 0);
  431.         PlayKey(indy, in_leftfwd, 4, 0x12, 0);
  432.     
  433.     # Swap in Sophia's goggle head
  434.         #call goggleHead;
  435.  
  436.     # Cut to Sophia...
  437.         SetCameraFocus(2, cam_6);
  438.         SetCameraSecondaryFocus(2, ct_6);
  439.         SetCameraFOV(35, 0, 0.0);
  440.         SlideHorizonSky(0.04, 0.0);
  441.  
  442.     # Sophia: "Listen...Volodnikov got word...Teotihuacan..."
  443.         curSound = PlayVoice(sophia, so_voltoteo, 1.0, 0);
  444.         Sleep(1.0);
  445.         StopKey(sophia, so_keyTrack1, 0.0);
  446.         so_keyTrack1 = PlayKey(sophia, so_sitcop, 2, 0x10, 0);
  447.         PlayKey(sophia, so_rightfwd, 4, 0x12, 0);
  448.         Sleep(5.5);
  449.         PlayKey(sophia, so_leftup, 4, 0x12, 0);
  450.         Sleep(2.5); # was 3.0
  451.         StopKey(sophia, so_keyTrack1, 0.0);
  452.         so_keyTrack1 = PlayKey(sophia, so_lookright, 2, 0x10, 0);
  453.         PlayKey(sophia, so_fwdright, 4, 0x12, 0);
  454.         WaitForSound(curSound);
  455.  
  456.     # Cut to Indy...
  457.         SetCameraFocus(2, cam_5);
  458.         SetCameraSecondaryFocus(2, ct_5);
  459.         SetCameraFOV(37, 0, 0.0);
  460.         SlideHorizonSky(-0.04, 0.0);
  461.  
  462.     # Indy: "Mexico?"
  463.         curSound = PlayVoice(indy, in_mexico, 1.0, 0);
  464.         StopKey(indy, in_keyTrack1, 0.0);
  465.         in_keyTrack1 = PlayKey(indy, in_lookleft, 2, 0x10, 0);
  466.         PlayKey(indy, in_fwdleft, 4, 0x12, 1);
  467.         WaitForSound(curSound);
  468.  
  469.     # Sophia (voice over): "Built by...Azerim, I think."
  470.         PlayVoice(sophia, so_builtbab, 1.0, 1);
  471.  
  472.     # Indy: "Azerim?"
  473.         curSound = PlayVoice(indy, in_azerim, 1.0, 0);
  474.         StopKey(indy, in_keyTrack1, 0.0);
  475.         in_keyTrack1 = PlayKey(indy, in_sitcop, 2, 0x10, 0);
  476.         PlayKey(indy, in_leftfwd, 4, 0x12, 1);
  477.  
  478.         WaitForSound(curSound);
  479.  
  480.     # Cut to helicopter heading for the horizon...
  481. } #### END OUT FOR DEMO ####
  482. else
  483. {
  484.     in_keyTrack1 = PlayKey(indy, in_sitcop, 2, 0x10, 0);
  485. }
  486.  
  487.     #======== Copter Outside Sound ========================
  488.         StopSound(coptersound2, 0.01);
  489.         coptersound1=PlaySoundThing(helirun2, copter, 0.8, 20, 100, 1);
  490.         ChangeSoundPitch(coptersound1, 0.8, 4.0);
  491.         ChangeSoundVol(coptersound1, 0.0, 6.0);
  492.  
  493.         SetPulse(0); # stop the vibration
  494.         SetCameraFocus(2, cam_7);
  495.         SetCameraSecondaryFocus(2, ct_7);    
  496.         SetCameraFOV(25, 0, 0.0);
  497.         SlideHorizonSky(0.02, 0.0);
  498.         AttachThingToThing(ct_7, copter);
  499.         AISetMoveSpeed(copter, 1.7); # was 2.0
  500.         AISetLookThing(copter, cop_mk_5);
  501.         AISetMoveThing(copter, cop_mk_5, 0);
  502.  
  503.     # Sophia: "And you might just get a jump on our friends...boat."
  504.     if (demostate == 0)
  505.     {
  506.         curSound = PlayVoice(sophia, so_getjump, 1.0, 0);
  507.     }
  508.  
  509.         SetCameraFOV(90, 1, 7.5);
  510.  
  511.     if (demostate == 0)
  512.     {
  513.         WaitForSound(curSound);
  514.     }
  515.         Sleep(2.0);
  516.  
  517.     if (demostate != 0)
  518.     {    
  519.         Sleep(3.8);
  520.     }
  521.  
  522.     #============== Fade Out ======================
  523.         AttachThingToThing(fader, cam_7); 
  524.         ThingFadeAnim(fader, 0, 1, 1.7, 0);
  525.         Sleep(2.0);
  526.  
  527.     # Clean up...
  528.         ClearThingFlags(player, 0x80000);
  529.         StopKey(copter, cop_keyTrack1, 0.0);
  530.         StopKey(sophia, so_keyTrack1, 0.0);
  531.         StopKey(indy, in_keyTrack1, 0.0);
  532.  
  533.     # RT: Restore default voice heads
  534.         SetThingVoiceHeads(sophia, "sohead", "head_so_msound.3do", "head_so_asound.3do", "head_so_amsound.3do", "head_so_osound.3do");
  535.  
  536.         SetCameraLookInterp(2, 0);
  537.         SetCameraPosInterp(2, 0);
  538.         EndCutScene();
  539.     
  540.     
  541.     # Restore control (TEMP!  This cog should end the level!)...
  542. #        ClearActorFlags(player, 0x200000);
  543. #        SetCurrentCamera(1);
  544.         ResetCameraFOV(0, 0.0);
  545.  
  546.     JonesEndLevel();                    # On to the next level.
  547.     }
  548.     return;
  549.  
  550. # ..............................................................................
  551.  
  552. pulse:
  553.  
  554.     vibe = RandBetween(1, 3);
  555.     if (vibe == 1)
  556.     {
  557.         posOffset = '-0.0004 0.000 -0.0002'; # 4 was 3
  558.         angOffset = '0.000 0.0003 0.0003'; # 3 was 2
  559.     }
  560.     if (vibe == 2)
  561.     {
  562.         posOffset = '0.0002 -0.0004 0.000';
  563.         angOffset = '0.0003 0.000 -0.0003';
  564.     }
  565.     if (vibe == 3)
  566.     {
  567.         posOffset = '0.000 0.0002 0.0004';
  568.         angOffset = '-0.0003 -0.0003 0.000';
  569.     }
  570.     vibe = RandBetween(1, 3);
  571.     if (vibe == 1)
  572.     {
  573.         SetPulse(0.05);
  574.     }
  575.     if (vibe == 2)
  576.     {
  577.         SetPulse(0.1);
  578.     }
  579.     if (vibe == 3)
  580.     {
  581.         SetPulse(0.15);
  582.     }
  583.     SetPOVShake(posOffSet, angOffSet, 10.0, 10.0);
  584.     return;
  585.  
  586. # ..............................................................................
  587.  
  588. prep_jeep:
  589.  
  590.     CopyPlayerHolsters(GetLocalPlayerThing(), jeepactor); 
  591.     
  592.     if(GetInv(GetLocalPlayerThing(), 66))
  593.     {
  594.         # can in inventory, not on jeep.
  595.         SendMessageEx(GetThingClassCog(jeepactor), user0, jeepactor, 0, 0, 0);
  596.     }
  597.     else
  598.     {
  599.         # Can on jeep.
  600.         SendMessageEx(GetThingClassCog(jeepactor), user1, jeepactor, 0, 0, 0);
  601.     }
  602.     return;
  603.  
  604. end
  605.